/**
 * File:   Node.java
 * Author: Gvennet
 */
package dht.async;

import java.util.List;
import java.util.concurrent.Delayed;

/** todo write javadoc */
public interface Node extends Delayed
{

    Identifier getIdentifier();

    RoutingTable getRoutingTable();

    void outboundPingRequest(Node receiver);

    void inboundPingRequest(Message message);

    void outboundPingResponse(Node receiver);

    void inboundPingResponse(Message message);

    void outboundFindNodeRequest(Node receiver, Identifier target);

    void inboundFindNodeRequest(Message message);

    void outboundFindNodeResponse(Node receiver, List<Node> nodes);

    void inboundFindNodeResponse(Message message);

    void timeout(Node node);

    void receive(Message m);

    void updateRoutingTable(Node node);

}
